package com.easondongh.system.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 接口访问日志表
 * @author EasonDongH
 * @date 2020/4/30 11:46
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "sys_log")
public class SysLog implements Serializable {
    /**
     * 日志id
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @TableField(value = "login_id")
    private Integer loginId;

    @TableField(value = "login_name")
    private String loginName;

    /**
     * 请求来源ip
     */
    @TableField(value = "login_ip")
    private String loginIp;

    /**
     * 请求接口
     */
    @TableField(value = "request_url")
    private String requestUrl;

    /**
     * 请求方式，get、post等
     */
    @TableField(value = "request_method")
    private String requestMethod;

    /**
     * 请求参数
     */
    @TableField(value = "request_params")
    private String requestParams;

    /**
     * 访问状态，1正常0异常
     */
    @TableField(value = "response_status")
    private Integer responseStatus;

    /**
     * 返回值
     */
    @TableField(value = "response_result")
    private String responseResult;

    /**
     * 异常信息
     */
    @TableField(value = "response_error")
    private String responseError;

    /**
     * 响应耗时
     */
    @TableField(value = "response_time")
    private Long responseTime;

    /**
     * 创建时间
     */
    @TableField(value = "create_time")
    private Date createTime;

    private static final long serialVersionUID = 1L;

    public static final String COL_ID = "id";

    public static final String COL_LOGIN_ID = "login_id";

    public static final String COL_LOGIN_NAME = "login_name";

    public static final String COL_LOGIN_IP = "login_ip";

    public static final String COL_REQUEST_URL = "request_url";

    public static final String COL_REQUEST_METHOD = "request_method";

    public static final String COL_REQUEST_PARAMS = "request_params";

    public static final String COL_RESPONSE_STATUS = "response_status";

    public static final String COL_RESPONSE_RESULT = "response_result";

    public static final String COL_RESPONSE_ERROR = "response_error";

    public static final String COL_RESPONSE_TIME = "response_time";

    public static final String COL_CREATE_TIME = "create_time";
}